package com.lyx.exercise_io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class WordStatistic {
    public static void main(String[] args) throws IOException {
        FileInputStream fs = new FileInputStream("c:\\developer\\myTest.txt");
        int a;
        int capital = 0;
        int lowercase = 0;

        while ((a = fs.read()) != -1){
            if(a>=65&&a<=91){
                capital++;
            }
            if(a>=97&&a<=125){
                lowercase++;
            }
        }
        System.out.println("大写："+capital);
        System.out.println("小写："+lowercase);
    }
}
